ACTIVITY ON OSCILLATIONS
A body is performing a simple harmonic oscillation x(t) = A sin(w t), with width A = 10 cm and frequency w = .
a) Calculate the position of the body 1, 2 and 3 sec from the starting time point the oscillation (the starting position regarded as 0).
b) Create the table of positions for the time points t = 0, , , 1, , ,2, , , 3, , ,4sec
c) Plot the graph of the position of the body in the time interval [0, T sec] where T = the smallest period.
Note: In order to define any function or run any program or command in Mathematica, press SHIFT + ENTER or ENTER in the Num Pad.
a) In order to calculate the body's position for t = 1 sec, t = 2 sec and t = 3 sec we are calculating the values of the function x(t) for t = 1, t = 2 and t = 3.
b) In order to create the table of positions for the time points t =0, , , 1, , ,2, , , 3, , ,4 sec we are using the command Table[ {t, x [t] }, {t, 0, 4, 1/3} ]
t | 0 | 1 | 2 | 3 | 4 | ||||||||
x(t) | 0 | 5 | 10 | 5 | 0 | -5 | -10 | -5 | 0 |
c) In order to plot the graph of positions for the time interval [0, T sec], firsty we are calculating T =
c1) EITHER we are ploting the points (t, x(t) ) for t =0, , , 1, , ,2, , , 3, , ,4 sec from the former table using the command ListPlot[Table[ {t, x [t] }, {t, 0, 4, 1/3} ] ]
Taking more points ListPlot[Table[ {t, x [t] }, {t, 0, 4, 0.1} ] ] or ListPlot[Table[ {t, x [t] }, {t, 0, 4, 0.01} ] ]
c2) OR we are ploting the graph of the function x(t) for t ∈[0, 4] with the command Plot[x [t], {t, 0, 4} ] ]
EXERCISE:
Using the commands and programs presented above, study the following oscillation:
A body is performing a simple harmonic oscillation, with width A = 5 cm and frequency w = .
a) Calculate the position of the body 1, 3 and 7 sec from the starting time point the oscillation (the starting position regarded as 0).
b) Create the table of positions for the time points t = 0, , , , T, , , , 2T sec, where T = the smallest period.
c) Plot the graph of the position of the body in the time interval [0, 2T sec] .
Created by Mathematica (November 4, 2015) |